import request from '@/utils/request'

// 查询水位流量关系对照列表
export function listRelZQ(query) {
  return request({
    url: '/waterManagement/RelZQ/list',
    method: 'get',
    params: query
  })
}

// 查询水位流量关系对照详细
export function getRelZQ(statCd) {
  return request({
    url: '/waterManagement/RelZQ/' + statCd,
    method: 'get'
  })
}

// 新增水位流量关系对照
export function addRelZQ(data) {
  return request({
    url: '/waterManagement/RelZQ',
    method: 'post',
    data: data
  })
}

// 修改水位流量关系对照
export function updateRelZQ(data) {
  return request({
    url: '/waterManagement/RelZQ',
    method: 'put',
    data: data
  })
}

// 删除水位流量关系对照
export function delRelZQ(statCd) {
  return request({
    url: '/waterManagement/RelZQ/' + statCd,
    method: 'delete'
  })
}

// 根据测站代码查询所属的曲线名称
export function selCurvNmByStatCd(query) {
  return request({
    url: '/waterManagement/RelZQ/selCurvNmByStatCd',
    method: 'get',
    params: query
  })
}

// 根据测站代码和曲线名称查询换算表
export function selRelZQCurvNm(query) {
  return request({
    url: '/waterManagement/RelZQ/selectRelZQListByStatCdAndCurvNm',
    method: 'get',
    params: query
  })
}

// 启动关闭关系曲线函数
export function updateRelZQEnabType(data) {
  return request({
    url: '/waterManagement/RelZQ/updateRelZQEnabType',
    method: 'put',
    params: data
  })
}

// 查询曲线详情
export function selQXByStatCdAndCurvNm(query) {
  return request({
    url: '/waterManagement/RelZQ/selQXByStatCdAndCurvNm',
    method: 'get',
    params: query
  })
}
